# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-astroid
pkgver=3.1.0
pkgrel=2
pkgdesc="A new abstract syntax tree from Python's ast"
url="https://pylint.pycqa.org/projects/astroid/en/latest/"
arch="noarch"
license="LGPL-2.1-or-later"
depends="python3 py3-lazy-object-proxy py3-wrapt"
replaces="py-logilab-astng"
makedepends="
	py3-gpep517
	py3-installer
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest py3-typing-extensions"
subpackages="$pkgname-pyc"
source="py3-astroid-$pkgver.tar.gz::https://github.com/PyCQA/astroid/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/astroid-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	# pip test
	pytest -k 'not test_no_user_warning'
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/astroid-*.whl
}

sha512sums="
7b2cd6270d1a9219d32e69e1a9c9eeffd2c5fcf575bc53df4a8c2d8df97b019e3e4e60768286a757a7390effcb454c7997f1f0f677c2b6370a2c3a9d46519057  py3-astroid-3.1.0.tar.gz
"
